import backpackerxl as xl

arr = []
num = []
xl.printColor('数字排序游戏（按q退出）', 34, 2)
tag = 0
while tag != 'q':
    tag = xl.inputColor('请输入一个数=', 34)
    arr.append(tag)

for i in range(len(arr) - 1):
    num.append(int(arr[i]))

flag = int(xl.inputColor('请选择排序还是升序\n 1 -> 升序\n 2 -> 降序\n 请输入=', 33))

xl.printColor(str(xl.mySortArray(num, flag)), 32, 2)
